// 导入 npm 包中的 类型，需要使用 import type
import type { RouteRecordRaw } from 'vue-router'

const routes: RouteRecordRaw[] = [
  {
    path: '/dashboard',
    name: 'dashboard',
    meta: {
      title: 'Dashboard',
      alwaysShow: true
    },
    component: () => import('@/layout/index.vue'),
    children: [
      {
        path: 'console',
        name: 'dashboard_console',
        meta: {
          title: '主控台'
        },
        component: () => import('@/views/dashboard/console.vue')
      },
      {
        path: 'monitor',
        name: 'dashboard_monitor',
        meta: {
          title: '监控页'
        },
        component: () => import('@/views/dashboard/monitor.vue')
      },
      {
        path: 'workplace',
        name: 'dashboard_workplace',
        meta: {
          title: '工作台'
        },
        component: () => import('@/views/dashboard/workplace.vue')
      }
    ]
  }
]

export default routes
